import { useFetchRefGet, useFetchRefPost } from '~/composables/useHttp/useFetchRef'

/**
 * 菜单列表
 */
export const menuApi = (p = 1) => {
    return useFetchRefPost<MenuVo>('menuApi', '/menu/list', {
        body: { pageNum: p, pageSize: 20 }
    })
}
/**
 * 菜单详情
 */
export const menuDetailsApi = (menuId: string) => {
    return useFetchRefGet<MenuVo>('menuDetailsApi', `/menu/details/${menuId}`)
}